﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Twodi.Aspect.Interfaces;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Twodi.Interfaces;

namespace Twodi.Aspect.Implemented
{
    /// <summary>
    /// Define um componente que possui textura.
    /// </summary>
    public class TextureAspect : AbstractAspect, ITexture
    {
        /// <summary>
        /// Construtor padrão.
        /// </summary>
        public TextureAspect(Texture2D texture)
        {
            this.Texture = texture;
            this.AlphaColor = Color.White;
        }

        /// <summary>
        /// Alpha color a ser usada durante o Draw.
        /// </summary>
        public Color AlphaColor
        {
            get;
            set;
        }

        /// <summary>
        /// Textura do componente.
        /// </summary>
        public Texture2D Texture
        {
            get;
            set;
        }

        /// <summary>
        /// Evento invocado caso a textura for alterada.
        /// </summary>
        public event EventHandler TextureChanged;
    }
}
